package com.yss.rest;

import com.yss.pojo.BondDTO;
import com.yss.pojo.response.ResponseMessage;
import com.yss.service.BondService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/bond")
public class BondController {

    @Autowired
    private BondService bondService;

    @PostMapping
    public ResponseMessage<Object> handleBondData(@RequestBody BondDTO bondDTO) {
        return ResponseMessage.success(bondService.handle(bondDTO));
    }
}
